home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Begin VB.Form Form1
- BorderStyle = 1 'Fixed Single
- Caption = "Keygen for Crackme 2 (gPs)"
- ClientHeight = 3195
- ClientLeft = 45
- ClientTop = 330
- ClientWidth = 4050
- LinkTopic = "Form1"
- MaxButton = 0 'False
- ScaleHeight = 3195
- ScaleWidth = 4050
- StartUpPosition = 3 'Windows Default
- Begin VB.CommandButton Command1
- Caption = "Calculate"
- Default = -1 'True
- Height = 375
- Left = 1080
- TabIndex = 3
- Top = 2640
- Width = 1935
- End
- Begin VB.TextBox Vorname
- Height = 375
- Left = 960
- MaxLength = 30
- TabIndex = 1
- Top = 1320
- Width = 3015
- End
- Begin VB.TextBox Name1
- Height = 375
- Left = 960
- MaxLength = 30
- TabIndex = 0
- Top = 720
- Width = 3015
- End
- Begin VB.Label Label4
- Caption = "Keygen for Crackme 2 (gPs)"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 495
- Left = 120
- TabIndex = 7
- Top = 120
- Width = 3975
- End
- Begin VB.Label Label3
- Caption = "Code :"
- Height = 375
- Left = 360
- TabIndex = 6
- Top = 2040
- Width = 495
- End
- Begin VB.Label Label2
- Caption = "Vorname :"
- Height = 375
- Left = 120
- TabIndex = 5
- Top = 1320
- Width = 855
- End
- Begin VB.Label Label1
- Caption = "Name :"
- Height = 375
- Left = 360
- TabIndex = 4
- Top = 720
- Width = 615
- End
- Begin VB.Label Code
- Appearance = 0 'Flat
- BackColor = &H80000005&
- ForeColor = &H80000008&
- Height = 375
- Left = 960
- TabIndex = 2
- Top = 2040
- Width = 3015
- End
- Attribute VB_Name = "Form1"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Dim UserName, UserVorName As String
- Private Sub Code_Click()
- Clipboard.SetText Code.Caption
- End Sub
- Private Sub Command1_Click()
- UserName = Name1.Text
- UserVorName = Vorname.Text
- 'check : name here ?
- If Trim(Name1.Text) = "" Then
- MsgBox "Please enter a name.", vbOKOnly, "Keygen for Crackme 2 by fLAIEr (gPs)" ' display a messagebox
- Exit Sub 'Exit the sub
- End If
- ' the temporary code is divided in 5 parts
- X1 = Len(UserName) * 3 * Len(UserVorName) * 5 * 5 * 6 / 6 ' 1st part
- X2 = Len(UserVorName) * 13 ' 2nd part
- X3 = Len(UserName) * 12 ' 3rd part
- X4 = "123" ' 4th part = constant = "123"
- X5 = Len(UserName) * Len(UserVorName) ' 5th part = lenght(name) * len(vorname)
- ' = 0 if no Vorname
- ' this code append all the part together and convert the result to a number
- TmpCode = Val(Trim(Str(X1) & Str(X2) & Str(X3) & Str(X4) & Str(X5)))
- FirstCharOfName = Asc(UserName) ' FirstCharOfName = ascii value of the first char of the name
- If (FirstCharOfName < 65) Or (FirstCharOfName > 90 And FirstCharOfName < 97) Or (FirstCharOfName > 122) Then
- Code = 0 'if the first char is different from A to Z or a to z
- Code = TmpCode * magic(Name1.Text) 'final code = temp code * magic value
- End If
- Code.Caption = Code 'display code
- End Sub
- 'here is the function that get the magic value
- Public Function magic(Name_of_user As String) As Integer
- Name_of_user = UCase(Name_of_user) ' name in uppercase
- magic_string = "17EA071d2c0c3f161a1f0d604A2F49204711521C6259362D4922" ' i got it with SoftIce and the help of Smartcheck
- PlaceOfMagicValue = Asc(Name_of_user) - 65 ' 0 if 'A', 1 if 'B', 2 if 'C'...
- Hex_Magic = Mid$(magic_string, PlaceOfMagicValue * 2 + 1, 2) 'get the magic value in hexa
- magic = Val(Trim("&H" & Hex_Magic)) ' convert the magic value to decimal
- End Function
-